﻿using System;
using MiniExcelLibs.Attributes;
using SqlSugar;
using WebSite.Class;

namespace WebSite.Models
{
    [SugarTable("AttackWebSite")]
    public class AttackWebSite
    {
        // 自增主键
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        [ExcelColumn(Name = "网站名称")]
        public int Id { get; set; }

        // 客户名称
        [ExcelColumn(Name = "网站名称")]
        public string CusomerName { get; set; }

        // 正式域名
        [ExcelColumn(Name = "网站域名")]
        public string Domain { get; set; }

        // 测试域名
        [ExcelColumn(Name = "测试域名")]
        public string TestDomain { get; set; }

        // 域名平台
        [ExcelColumn(Name = "域名平台")]
        public DomainTypeEnum DomainType { get; set; }

        [SugarColumn(IsIgnore = true)]
        [ExcelIgnore]
        public string DomainTypeStr { get; set; }

        // 数据库类型
        [ExcelColumn(Name = "数据库类型")]
        public DataBaseTypeEnum DataBaseType { get; set; } = DataBaseTypeEnum.SqlServer;

        [SugarColumn(IsIgnore = true)]
        [ExcelIgnore]
        public string DataBaseTypeStr { get; set; }

        // 数据库地址
        [ExcelColumn(Name = "数据库地址")]
        public string DatabaseStr { get; set; }

        // 数据库名称
        [ExcelColumn(Name = "数据库名称")]
        public string DatabaseName { get; set; }

        // 数据库账号
        [ExcelColumn(Name = "数据库账号")]
        public string DatabaseUser { get; set; }

        // 数据库密码
        [ExcelColumn(Name = "数据库密码")]
        public string DatabasePwd { get; set; }

        // FTP连接
        [ExcelColumn(Name = "FTP地址")]
        public string FtpStr { get; set; }

        // FTP账号
        [ExcelColumn(Name = "FTP账号")]
        public string FtpUserName { get; set; }

        // FTP密码
        [ExcelColumn(Name = "FTP密码")]
        public string FtpPassword { get; set; }

        // 创建时间
        [ExcelColumn(Name = "创建时间", Format = "yyyy-MM-dd HH:mm")]
        public DateTime CreateTime { get; set; } = DateTime.Now;

        // 创建人
        [ExcelColumn(Name = "创建人", Ignore = true)]
        public string CreateBy { get; set; } = "xwltz";

        // 更新时间
        [ExcelColumn(Name = "更新时间", Ignore = true)]
        public DateTime ModifyTime { get; set; } = DateTime.Now;

        // 更新人
        [ExcelColumn(Name = "更新人", Ignore = true)]
        public string ModifyBy { get; set; } = "xwltz";

        // 是否启用
        [ExcelColumn(Name = "是否启用", Ignore = true)]
        public bool EnabledMark { get; set; } = true;

        // 是否删除
        [ExcelColumn(Name = "是否删除", Ignore = true)]
        public bool DeleteMark { get; set; } = false;

        // 备注
        [ExcelColumn(Name = "备注")]
        public string Remark { get; set; } = string.Empty;

        // 系统版本号
        [ExcelColumn(Name = "系统版本")]
        public VersionEnum Version { get; set; }

        [SugarColumn(IsIgnore = true)]
        [ExcelIgnore]
        public string VersionStr { get; set; }

        // 主机供应商
        [ExcelColumn(Name = "主机供应商")]
        public SupplierEnum Supplier { get; set; }

        [SugarColumn(IsIgnore = true)]
        [ExcelIgnore]
        public string SupplierStr { get; set; }

        // 主机类型 备案主机 免备案主机
        [ExcelColumn(Name = "主机类型")]
        public HostTypeEnum HostType { get; set; }

        [SugarColumn(IsIgnore = true)]
        [ExcelIgnore]
        public string HostTypeStr { get; set; }

        // 签单商务
        [ExcelColumn(Name = "签单商务")]
        public string SignUser { get; set; }

        // 签单日期
        [ExcelColumn(Name = "下单日期", Format = "yyyy-MM-dd HH:mm")]
        public DateTime SignTime { get; set; } = DateTime.Now;

        // 签单年限
        [ExcelColumn(Name = "签单年限")]
        public int SignYear { get; set; }
    }
}